Get information about the API
After initialising the API in either offline or online mode (see this page), you can run any of the below commands to get information about the API.
This returns the signer object of the current connected account.
All API utils also work in offline mode.
See the Initialise page for instructions on how to set the API in Offline mode.
- Gateway
- Version
- Options
- All
avnSdk.gateway;
Example Result
This will return null
in Offline mode.
https://gateway.testnet.aventus.network
avnSdk.options;
Example Result
3.1.0
avnSdk.options;
Example Result
{
setupMode: 0,
signingMode: 0,
defaultLogLevel: 'info',
nonceCacheOptions: { nonceCacheType: 0 }
}
avnSdk;
Example Result
AvnApi {
options: {
setupMode: 0,
signingMode: 0,
defaultLogLevel: 'info',
nonceCacheOptions: { nonceCacheType: 0 }
},
version: '3.1.0',
gateway: '<https://gateway.testnet.aventus.network/>',
accountUtils: [class AccountUtils],
awtUtils: [class AwtUtils],
proxyUtils: [class ProxyUtils],
signer: {
sign: [Function: sign],
address: 'your address'
},
myAddress: 'your address',
myPublicKey: 'your public key',
apis: [Function (anonymous)]
}